package com.prasad.java;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

import static org.junit.Assert.*;
import static org.hamcrest.CoreMatchers.*;
import org.junit.Test;

public class MyApp {
	
	 @Test
	 public void myTest(){
		 
		 List<String> list = new ArrayList<String>();
		 
		 list.add("Sreedhar");
		 list.add("prasad");
		 list.add("Ali");
		 list.add("Prasad");
		 list.add("sreedhar");
		 list.add("ali");
		 
		 //Collections.sort(list);
		 
		 Collections.sort(list, new StringCompare());
		 
		 for(String list1:list) {
			 
			System.out.println(list1);
		}
		 
		 assertThat(list.get(0), is("ali"));
		 
	 }
	 
}
